package com.hushui.mall.third.controller;

import com.hushui.common.utils.R;
import com.hushui.mall.third.compent.SmsMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**第三方服务调用
 * @author 胡泽明
 * @date 2023/3/17
 */
@RestController
@RequestMapping("/sms")
public class SmsController {
    @Autowired
    SmsMessage smsMessage;
    @RequestMapping("/sendCode")
    public R sendMessage(@RequestParam("phone")String phone, @RequestParam("code")String code){
        System.out.println(phone);
        System.out.println(code);
         smsMessage.sent(phone,code);
         return  new R();
    }
}
